<?php

/*
 * 		SEARCH FORM
 */

class Inc_Form_KeywordSearch extends Zend_Form
{

	public function init()
	{
		/*
		 * 		INIT FORM
		 */
		$this->setAction('/catalog/item/searchkey')->setMethod('get');

		
		/*
		 * 		SEARCH PRICE
		 */
		$keywords = new Zend_Form_Element_Text('key');
		$keywords->setLabel('Keywords: ')
			->setOptions(array('size' => '20'))
			->addFilters(array('HtmlEntities', 'StringTrim'));
		
		/*
		 * 		SET DECORATORS
		*/
		$keywords->setDecorators(array(
				array('ViewHelper'),
				array('Errors'),
				array('Label' , array('tag' => '<span>'))
		));
		
		
		/*
		 * 		SUBMIT BUTTON
		*/
		
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Search');
		
		$submit->setDecorators(array(
				array('ViewHelper')));
		
		/*
		 * 		ADD ELEMENTS FORM
		 */
		$this->addElement($keywords)
			 ->addElement($submit);
		
	}
}